{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sys\n",
    "sys.path.append(\"../../LigandNet/scripts\")\n",
    "# sys.path.append(\"../utilities/utility.py\")\n",
    "from utility import FeatureGenerator"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from rdkit import Chem\n",
    "from rdkit.Chem import AllChem"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_ecfp(smiles):\n",
    "    mol = Chem.MolFromSmiles(smiles)\n",
    "    ecfp = AllChem.GetMorganFingerprintAsBitVect(mol, 3).ToBitString()\n",
    "    return [int(s) for s in ecfp]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [],
   "source": [
    "class FeatureTypeNotSupported(Exception):\n",
    "    \"\"\" Raised when the provided feature type is not supported\"\"\"\n",
    "    pass\n",
    "\n",
    "class Dataset:\n",
    "    # Supported feature types\n",
    "    _feature_types = [\"ecfp-6\"]\n",
    "    X = None\n",
    "    y = None\n",
    "    _df = pd.DataFrame()\n",
    "    _smiles_field = None\n",
    "    _target_field = None\n",
    "    smiles = None\n",
    "    targets = None\n",
    "    \n",
    "    def __init__(self, df, smiles_field, target_field):\n",
    "        # clean the dataset\n",
    "        self._df = df if len(df)>0 else None\n",
    "        self._smiles_field = smiles_field\n",
    "        self._target_field = target_field\n",
    "        \n",
    "        # Clean the data\n",
    "        self._clean_data()\n",
    "        \n",
    "        # Populate the smiles and target list\n",
    "        self._get_smiles_targets()\n",
    "    \n",
    "    def _get_smiles_targets(self):\n",
    "        self.smiles = self._df[self._smiles_field].values.tolist()\n",
    "        self.targets = self._df[self._target_field].values.tolist()\n",
    "        \n",
    "    def _clean_data(self):\n",
    "        if self._df is None: return\n",
    "        # Drop Nan values\n",
    "        # self._df = df.dropna(axis=0)\n",
    "        # Check the target field\n",
    "        self._df = self._df[np.isfinite(self._df[self._target_field])]\n",
    "        \n",
    "    def _get_ecfp6(self, smiles):\n",
    "        mol = Chem.MolFromSmiles(smiles)\n",
    "        ecfp = AllChem.GetMorganFingerprintAsBitVect(mol, 3).ToBitString()\n",
    "        return [int(s) for s in ecfp]\n",
    "    \n",
    "    def create_dataset(self, feature_type=\"ecfp-6\"):\n",
    "        if feature_type not in self._feature_types:\n",
    "            raise FeatureTypeNotSupported(\"Feature type is not supported.\")\n",
    "        self.X = np.array([self._get_ecfp6(s) for s in self.smiles], dtype=np.float32)\n",
    "        self.y = np.array(self.targets, dtype=np.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>CMPD_CHEMBLID</th>\n",
       "      <th>COMPOUND_KEY</th>\n",
       "      <th>MOLWEIGHT</th>\n",
       "      <th>ALOGP</th>\n",
       "      <th>PSA</th>\n",
       "      <th>CANONICAL_SMILES</th>\n",
       "      <th>Km</th>\n",
       "      <th>Vmax</th>\n",
       "      <th>pKm</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>CHEMBL300797</td>\n",
       "      <td>L-tyrosine methyl ester</td>\n",
       "      <td>195.22</td>\n",
       "      <td>0.43</td>\n",
       "      <td>72.55</td>\n",
       "      <td>COC(=O)[C@@H](N)Cc1ccc(O)cc1</td>\n",
       "      <td>4000000.0</td>\n",
       "      <td>350.0</td>\n",
       "      <td>-15.201805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>CHEMBL1288</td>\n",
       "      <td>1-Naphthalenemethanol</td>\n",
       "      <td>158.20</td>\n",
       "      <td>2.33</td>\n",
       "      <td>20.23</td>\n",
       "      <td>OCc1cccc2ccccc12</td>\n",
       "      <td>30000.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>-10.308953</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>CHEMBL14060</td>\n",
       "      <td>Phenol</td>\n",
       "      <td>94.11</td>\n",
       "      <td>1.39</td>\n",
       "      <td>20.23</td>\n",
       "      <td>Oc1ccccc1</td>\n",
       "      <td>19000.0</td>\n",
       "      <td>350.0</td>\n",
       "      <td>-9.852194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>CHEMBL14126</td>\n",
       "      <td>2-naphthol</td>\n",
       "      <td>144.17</td>\n",
       "      <td>2.55</td>\n",
       "      <td>20.23</td>\n",
       "      <td>Oc1ccc2ccccc2c1</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>1130.0</td>\n",
       "      <td>-8.987197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>CHEMBL3085280</td>\n",
       "      <td>4-ethylbenzyl alcohol</td>\n",
       "      <td>488.55</td>\n",
       "      <td>0.27</td>\n",
       "      <td>163.53</td>\n",
       "      <td>N[C@@H](C(=O)NC1C2SCC(=C(N2C1=O)C(=O)O)CSc3c[n...</td>\n",
       "      <td>60000.0</td>\n",
       "      <td>182.0</td>\n",
       "      <td>-11.002100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   CMPD_CHEMBLID             COMPOUND_KEY  MOLWEIGHT  ALOGP     PSA  \\\n",
       "0   CHEMBL300797  L-tyrosine methyl ester     195.22   0.43   72.55   \n",
       "1     CHEMBL1288    1-Naphthalenemethanol     158.20   2.33   20.23   \n",
       "2    CHEMBL14060                   Phenol      94.11   1.39   20.23   \n",
       "3    CHEMBL14126               2-naphthol     144.17   2.55   20.23   \n",
       "4  CHEMBL3085280    4-ethylbenzyl alcohol     488.55   0.27  163.53   \n",
       "\n",
       "                                    CANONICAL_SMILES         Km    Vmax  \\\n",
       "0                       COC(=O)[C@@H](N)Cc1ccc(O)cc1  4000000.0   350.0   \n",
       "1                                   OCc1cccc2ccccc12    30000.0    26.0   \n",
       "2                                          Oc1ccccc1    19000.0   350.0   \n",
       "3                                    Oc1ccc2ccccc2c1     8000.0  1130.0   \n",
       "4  N[C@@H](C(=O)NC1C2SCC(=C(N2C1=O)C(=O)O)CSc3c[n...    60000.0   182.0   \n",
       "\n",
       "         pKm  \n",
       "0 -15.201805  \n",
       "1 -10.308953  \n",
       "2  -9.852194  \n",
       "3  -8.987197  \n",
       "4 -11.002100  "
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_df = pd.read_csv(\"data/curated_data.csv\")\n",
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {},
   "outputs": [],
   "source": [
    "# # Extract features\n",
    "# def get_features(SMILES):\n",
    "#     try:\n",
    "#         feat_gen = FeatureGenerator(SMILES)\n",
    "#         return feat_gen.toTPATF()\n",
    "#     except Exception as e:\n",
    "#         print(str(e))\n",
    "#         return float('NaN')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Model for Km"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.ensemble import RandomForestRegressor\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import r2_score\n",
    "from sklearn.externals import joblib\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "metadata": {},
   "outputs": [],
   "source": [
    "random_state = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(37, 2048) (37,) (16, 2048) (16,)\n"
     ]
    }
   ],
   "source": [
    "dataset = Dataset(data_df, smiles_field=\"CANONICAL_SMILES\", target_field=\"pKm\")\n",
    "dataset.create_dataset()\n",
    "train_x, test_x, train_y, test_y = train_test_split(dataset.X, dataset.y, test_size=0.3, random_state = random_state)\n",
    "print(train_x.shape, train_y.shape, test_x.shape, test_y.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/mhassan/anaconda3/envs/ml/lib/python3.6/site-packages/sklearn/ensemble/forest.py:723: UserWarning: Some inputs do not have OOB scores. This probably means too few trees were used to compute any reliable oob estimates.\n",
      "  warn(\"Some inputs do not have OOB scores. \"\n",
      "/home/mhassan/anaconda3/envs/ml/lib/python3.6/site-packages/sklearn/ensemble/forest.py:723: UserWarning: Some inputs do not have OOB scores. This probably means too few trees were used to compute any reliable oob estimates.\n",
      "  warn(\"Some inputs do not have OOB scores. \"\n",
      "/home/mhassan/anaconda3/envs/ml/lib/python3.6/site-packages/sklearn/ensemble/forest.py:723: UserWarning: Some inputs do not have OOB scores. This probably means too few trees were used to compute any reliable oob estimates.\n",
      "  warn(\"Some inputs do not have OOB scores. \"\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=None, error_score='raise',\n",
       "       estimator=RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
       "           max_features='auto', max_leaf_nodes=None,\n",
       "           min_impurity_split=1e-07, min_samples_leaf=1,\n",
       "           min_samples_split=2, min_weight_fraction_leaf=0.0,\n",
       "           n_estimators=10, n_jobs=1, oob_score=False, random_state=None,\n",
       "           verbose=0, warm_start=False),\n",
       "       fit_params={}, iid=True, n_jobs=1,\n",
       "       param_grid={'n_estimators': [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500], 'oob_score': [True, False], 'n_jobs': [-1], 'random_state': [1]},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score=True,\n",
       "       scoring=None, verbose=0)"
      ]
     },
     "execution_count": 222,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\"n_estimators\": [i for i in range(10, 501, 10)], \n",
    "          \"oob_score\": [True, False], \n",
    "          \"n_jobs\": [-1], \n",
    "          \"random_state\": [random_state]}\n",
    "rf_clf = RandomForestRegressor()\n",
    "grid_clf = GridSearchCV(rf_clf, param_grid=params)\n",
    "grid_clf.fit(train_x, train_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
       "           max_features='auto', max_leaf_nodes=None,\n",
       "           min_impurity_split=1e-07, min_samples_leaf=1,\n",
       "           min_samples_split=2, min_weight_fraction_leaf=0.0,\n",
       "           n_estimators=60, n_jobs=-1, oob_score=True, random_state=1,\n",
       "           verbose=0, warm_start=False)"
      ]
     },
     "execution_count": 223,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = grid_clf.best_estimator_\n",
    "clf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
       "           max_features='auto', max_leaf_nodes=None,\n",
       "           min_impurity_split=1e-07, min_samples_leaf=1,\n",
       "           min_samples_split=2, min_weight_fraction_leaf=0.0,\n",
       "           n_estimators=60, n_jobs=-1, oob_score=True, random_state=1,\n",
       "           verbose=0, warm_start=False)"
      ]
     },
     "execution_count": 224,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = grid_clf.best_estimator_\n",
    "clf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 225,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9297958530633246 0.6872444314947843\n"
     ]
    }
   ],
   "source": [
    "train_pred = clf.predict(train_x)\n",
    "train_r2 = r2_score(y_pred=train_pred, y_true=train_y)\n",
    "test_pred = clf.predict(test_x)\n",
    "test_r2 = r2_score(y_pred=test_pred, y_true=test_y)\n",
    "print(train_r2, test_r2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 206,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=56)]: Done  70 out of  90 | elapsed:    0.0s remaining:    0.0s\n",
      "[Parallel(n_jobs=56)]: Done  90 out of  90 | elapsed:    0.0s finished\n",
      "[Parallel(n_jobs=56)]: Done  70 out of  90 | elapsed:    0.0s remaining:    0.0s\n",
      "[Parallel(n_jobs=56)]: Done  90 out of  90 | elapsed:    0.0s finished\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9069055285578072 0.7670636337630219\n"
     ]
    }
   ],
   "source": [
    "train_pred = clf.predict(train_x)\n",
    "train_r2 = r2_score(y_pred=train_pred, y_true=train_y)\n",
    "test_pred = clf.predict(test_x)\n",
    "test_r2 = r2_score(y_pred=test_pred, y_true=test_y)\n",
    "print(train_r2, test_r2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=56)]: Done  88 tasks      | elapsed:    0.0s\n",
      "[Parallel(n_jobs=56)]: Done 400 out of 400 | elapsed:    0.1s finished\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9267644771551218 0.6854295959526698\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=56)]: Done  88 tasks      | elapsed:    0.0s\n",
      "[Parallel(n_jobs=56)]: Done 400 out of 400 | elapsed:    0.1s finished\n"
     ]
    }
   ],
   "source": [
    "train_pred = clf.predict(train_x)\n",
    "train_r2 = r2_score(y_pred=train_pred, y_true=train_y)\n",
    "test_pred = clf.predict(test_x)\n",
    "test_r2 = r2_score(y_pred=test_pred, y_true=test_y)\n",
    "print(train_r2, test_r2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEWCAYAAAB42tAoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAGzFJREFUeJzt3X+cXHV97/HXmySSBdQoCfJIICQIBAnIDxeQArb1BlKuVZLUIO1Fa7WmqVi09xI1pUFosRaiUpBSSbFWaPtAUBLkBlwJ9xaq9deGBJIY0xJIahLRBMwFwpIf5HP/OGfJZDNz9uzOnjkzO+/n4zGPnfP7k2GZ957v95zvUURgZmZWy0FlF2BmZs3NQWFmZpkcFGZmlslBYWZmmRwUZmaWyUFhZmaZHBRmBZB0iaTNkl6U9Jay6zGrh4PCmkb6pdr72iupp2L6f9Sx3x9Iumwoa83hRuBDEXFYRKxt8LHNhtTIsgsw6xURh/W+l7QB+MOIWFZeRQMnaSQgYDywZpD7GBERrwxpYWZ18BmFtQxJIyQtkPSUpG2S/lnSmHTZoZLukvScpO2SfijpDZK+AJwJ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7YnFq1mQ2Gm57M+kg7sn8l6fh05M7K52ovAy7vnZB0Wo3dfB2YDxwcEb2jFL+efc1aH6yx3QaS5iQkncW+obCXAZdIGpsuO1zJM8rHkXS+3wN8hmTofLMh5aAwq+5TJH/xP0wy+mivy4FzJT0h6SfAR2psfw/we+xrdoLkwUMLJWUNF34P8CZJK4APkw4vHxGrSB4QtUzSEyRNTG8iCZJHJa0E/h74swH9K81y8OixZmaWyWcUZmaWyUFhZmaZHBRmZpbJQWFmZpkcFGZmlslBYWZmmRwUZmaW6f8DdvDiZUTripYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(test_y, test_pred)\n",
    "plt.title(\"Test performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEWCAYAAAB42tAoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAHARJREFUeJzt3X2UHHWd7/H3hyTC8LAMmiAngTEgEC4QnhyeBPSKwaxXhcDK0y4rXlyyICruvQSNCMpdXIGoLMiykgU9gt5F0CTIwhoJHsFlF3BCgCRCVh4lk2VNXHN5GklIvvePqoHOpLumZjLVVT39eZ3TZ7qquqs+SSb97fr9qn4/RQRmZmaNbFV2ADMzqzYXCjMzy+RCYWZmmVwozMwskwuFmZllcqEwM7NMLhRmBZB0iqReSS9L+m9l5zHbEi4UVhnph2r/Y6OkvprlP9uC/T4g6YyRzJrDVcBZEbF9RDze5GObjaixZQ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HSEkrlPlki6X9Jedd57maTP1iw/kQ6JgqQz02M+Iuk6SVtJGivpZiXzfyyT9JmR/dsxc6Ew67cvcGNEHAz0ZrzuGuDKiOgGTqH+GEw/SLf1j3v1tnTU0seBo9Nj/DVwWd5wkvYHTgTenc5RMZZkPo13AeMjYmpE7A/clHefZnm56cks8VRE/DLH66YBU2pG8N1JUkdE9NW85lbgDpJicGq6DMlgjjdJeucw8k0jGZ21Jz12B8kw6QvTPFcDdwE/bbgHs2FyoTBL1E4GtZFNhyGvnR5XwGERsa7RjiLiOSXT1e5LUig+nm76CrAwIq6TtCfJGFMDvc6mZ/r9xxbw7Yi4eOAbJB0AfBD4DMkcIFUdF8palJuezAZIO7J/L2kvSVuRNPn0WwSc178g6aAGu/kByWRDW0dE/4jEO/Jms9bHG7zvWZLmJJTMk90/FPoi4BSlcz2nV3B1SZpA0vl+G/AlkmHyzUaUC4VZfZ8j+cZ/D8mw1P3OA46S9JikX5GM8lrPbcCf8mazEyQTOc2RlDX8+m3A2yUtAT5BMvUtEbGUZPKqRZIeI2liejtJIblP0iPAP5BM0GM2ojx6rJmZZfIZhZmZZXKhMDOzTC4UZmaWyYXCzMwyuVCYmVkmFwozM8vkQmFmZpn+PzNMkVD/NNv0AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(test_y, test_pred)\n",
    "plt.title(\"Test performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEWCAYAAAB42tAoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2Z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W/gncDHSNb5aMV5oGwEc9WT2QBpQ/bTknaXtBlJlU/JfOC00oakfapc5ockiwttERGlmYa35ZVqrVOqPO9RkuoklKyLXZryfD5wvNI1ntMeXBMljSNpfL8O+BzJ9PdmdeVEYVbZp0m+8f+CZDrqktOAqUoWvv8DyayulVwH/B9eqXaCZLGm2ZKypli/DnitpMXAB0iWtiUilpIsTjVf0t0kVUyvJUkkv5K0BPgWycI8ZnXl2WPNzCyTSxRmZpbJicLMzDI5UZi0tSDbAAAAH0lEQVSZWSYnCjMzy+REYWZmmZwozMwskxOFmZll+v8zpRJZ40NzVAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(train_y, train_pred)\n",
    "plt.title(\"Training performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEWCAYAAAB42tAoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAHzNJREFUeJzt3XuYHHWd7/H3hySQgQUGJchJwhgQiAsEAYeLIsuKweg5AiEq4q67sLrGC67gSoQIKJwFQaIguz6sZNF9RDwIKIkiQjSyoqKACQkGhAgCSiZeiBK5jeT2PX9UdehMuqtrLt1VPf15PU8/mbp01bc7M/Wt+l0VEZiZmdWzTdEBmJlZuTlRmJlZJicKMzPL5ERhZmaZnCjMzCyTE4WZmWVyorC2IWmMpGcl9YzkvkVT4hpJayX9pOh4zAYaW3QANnpJerZqcXvgBWBjuvy+iPjqYI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aQ7Je1T470XSjqjavmhdNgTJJ2SnnO5pCslbSNprKSvKJnj435JHx7Zb8fMicKsYj/gixFxMNCXsd+/A5dGRC9wErXHXLo+3VYZ2+ql6WilDwKvS8/xb8CFeYOTdABwIvDadE6KsSTzZrwa2DUipkXEAcA1eY9plpeLnswSv4qIn+XYbzowtWqE3l0kdUVEf9U+NwA3kySDd6TLkAzWeI2kVwwhvukkI7IuSc/dRTIc+qI0niuA7wDfrXsEsyFyojBLVE/2tIkthxuvnvZWwGERsa7egSLi10qmo92PJFGcmm66CFgUEVdK2ptkLKmBNrDlk37l3AK+FBHnDXyDpAOBNwMfJpnno4zjQFkbc9GT2QBpRfZTkvaRtA1JkU/FYuC0yoKkg+oc5nqSyYW2i4jKSMM782Kx1ql13vc4SXESSubFrgx5vhg4Sekcz2kLrh5JE0gq328EPkky/L3ZiHKiMKvtLJI7/u+TDEddcRpwpJKJ739BMqprLTcCf8eLxU6QTNY0T1LWEOs3Ai+TtAx4D8nUtkTECpLJqRZL+jlJEdPLSBLJDyUtB/6LZGIesxHl0WPNzCyTnyjMzCyTE4WZmWVyojAzs0xOFGZmlsmJwszMMjlRmJlZJicKMzPL9P8B/4bCSghxTq8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(train_y, train_pred)\n",
    "plt.title(\"Training performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Km_model.clf']"
      ]
     },
     "execution_count": 193,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "joblib.dump(clf, \"Km_model.clf\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Vmax Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(42, 2048) (42,) (11, 2048) (11,)\n"
     ]
    }
   ],
   "source": [
    "dataset = Dataset(data_df, smiles_field=\"CANONICAL_SMILES\", target_field=\"Vmax\")\n",
    "dataset.create_dataset()\n",
    "train_x, test_x, train_y, test_y = train_test_split(dataset.X, dataset.y, test_size=0.2)\n",
    "print(train_x.shape, train_y.shape, test_x.shape, test_y.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {},
   "outputs": [],
   "source": [
    "params = {\"n_estimators\": [i for i in range(10, 501, 10)], \"oob_score\": [True, False], \"n_jobs\": [-1], \"random_state\": [1]}\n",
    "rf_clf = RandomForestRegressor(verbose=True)\n",
    "grid_clf = GridSearchCV(rf_clf, param_grid=params)\n",
    "grid_clf.fit(train_x, train_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
       "           max_features='auto', max_leaf_nodes=None,\n",
       "           min_impurity_split=1e-07, min_samples_leaf=1,\n",
       "           min_samples_split=2, min_weight_fraction_leaf=0.0,\n",
       "           n_estimators=10, n_jobs=-1, oob_score=True, random_state=1,\n",
       "           verbose=True, warm_start=False)"
      ]
     },
     "execution_count": 197,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = grid_clf.best_estimator_\n",
    "clf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=10)]: Done   2 out of  10 | elapsed:    0.0s remaining:    0.0s\n",
      "[Parallel(n_jobs=10)]: Done  10 out of  10 | elapsed:    0.0s finished\n",
      "[Parallel(n_jobs=10)]: Done   2 out of  10 | elapsed:    0.0s remaining:    0.0s\n",
      "[Parallel(n_jobs=10)]: Done  10 out of  10 | elapsed:    0.0s finished\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7636706913309964 0.36297914592850367\n"
     ]
    }
   ],
   "source": [
    "train_pred = clf.predict(train_x)\n",
    "train_r2 = r2_score(y_pred=train_pred, y_true=train_y)\n",
    "test_pred = clf.predict(test_x)\n",
    "test_r2 = r2_score(y_pred=test_pred, y_true=test_y)\n",
    "print(train_r2, test_r2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAG6NJREFUeJzt3X2cVdV97/HPV0Ado9dRQSMDBh8oxmgUOyoGm5sHLWrSiDY+tWlMYkNtSdV7c0kgvcbkNr40EjWaRCtRE821UayImlgJ4lOS1ocxGMAgFRUjAwpGUaJzFfB3/9hr5DBuztkMc2bPmfm+X6/zOnuv/fQ7Szm/2Wuts5ciAjMzs662KTsAMzPrm5wgzMwslxOEmZnlcoIwM7NcThBmZpbLCcLMzHI5QZj1IEmnSGqX9EdJ7y87HrOt4QRhpUtfpp2vtyV1VKz/9Vac9yFJn+nJWAu4DPhCROwYEYt7+dpmPWpw2QGYRcSOncuSlgF/GxH3lBfRlpM0GBAwHHiim+cYFBEbejQws63gOwjr8yQNknSepGckvSTpRknNadt7JN0k6WVJayQ9LGkXSZcAhwHXpDuRS3LOu7+k9ZLOkrRS0gpJ/1jwup3HflHS88Bc4JV06BJJT6T9DpL0yxTbAknHVZz/JklXSPqFpNeBI1PZ5ZLmSnpd0v2Sdpd0ZTrHE5IOqjjH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pS0H3B3zuHr2fSOvvPaAq6LiPO6HiDpg2Sz250N/CXZ7HZmPcZNTGZJ6qB+RdJoSduQNe10ugeY3Lki6ZDNnOZmstkLt4uI36WyndnYfPW5zRy3jKzZCEmHs/Fx4vcAp0gamrbtJmkvScPIOtVvAc4H+v282Nb7nCDMNvVVsr/w55E9+bbTZGC8pAWSfgd8cTPH3wL8FRublyCbb3i6pF9Xue4twB6S5pM9bfcZgIhYCHwTuEfSArKmpD3IEsiDaYa3HwJf26JPaVaAn+ZqZma5fAdhZma5nCDMzCyXE4SZmeVygjAzs1xOEGZmlssJwszMcjlBmJlZrv8Pr7L/47cierIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(test_y, test_pred)\n",
    "plt.title(\"Test performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XuYXFWZ7/Hvj06AiEBzCQidxIDkiTJGCLYkisdRULkclciokEENyBh18HjjRBMPyvGYERwcEGdGxhzQAWEyXITmIhIx4AWVQMdEogISrkknQpAkIGYkCe/8sVeFSmdX9a6kq6uq6/d5nnpq77VX7f3uVJ56e6+191qKCMzMzPrbqdEBmJlZc3KCMDOzXE4QZmaWywnCzMxyOUGYmVkuJwgzM8vlBGFNT1KHpD9JGjeYdRtNmcslrZP0i0bHY9bfiEYHYM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5Jy/tLuk5Sr6S705O0/ffXW/bUNJLulHSYpKmSfpkG7Pu5pAk5n50r6VNl6/dLGpOWZ6RjLpX0TUk7SRoh6buSlqVz+MTg/uuYOUGYHQpcGtlgen1V6n0D+MeI6AbeB1ySU+eqtI30475PRPyabA6IN6ZjfBmYWzQ4Sa8G3g28ISIOJ7vqPwV4LbBvREyKbE6Gy4vu06woNzFZu3soIu4pUO+twMSsJQqAvSSNiogNZXWuBm4iSwInp3WATuBySa/YjvjeCrwO6E3HHkU2tPSCFM9FwC3AD7dj32ZVOUFYu3uubPkFth66edeyZQFHRsTzlXYUEY9J+lOa5e9k4LS06R/IJs/5pqRDgFtzPr6Jra/oS8cW8O2I+EL/D0h6Ddkw258A/oZsljOzQeMmJrMkdVCvlTRB0k5kTTslPwLOLK1IOrzCbq4im6lwl4j4XSrbkxebr06r8LlHyZqNkHQkLw4f/SPgfZL2Tdv2kTRO0miyTvVryKa7bNr5q611OUGYbe1zZH/hLyQb3bPkTOCoNFn974APV/j8NcDf8mLzEmRzMJ8v6edVjnsNsL+kJWQjij4MEBHLyEZO/ZGke8makvYnSyA/lbQU+P/A52s6S7MCPJqrmZnl8hWEmZnlcoIwM7NcThBmZpbLCcLMzHI5QZiZWS4nCDMzy+UEYWZmuf4bwt2JqgP+QNsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "plt.scatter(train_y, train_pred)\n",
    "plt.title(\"Training performance\")\n",
    "plt.xlabel(\"True values\")\n",
    "plt.ylabel(\"Predicted values\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['vmax_model.clf']"
      ]
     },
     "execution_count": 201,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "joblib.dump(clf, \"vmax_model.clf\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
